package org.jfk.core.web.taglib;

import java.io.IOException;

import javax.servlet.jsp.JspException;

import org.jfk.core.utils.I18nUtil;

/**
 * 国际化标签
 * @author jxf
 * 2015年4月1日
 */
public class TextTag extends AbstractTag {
	
	public String key ;
	
	public int doEndTag() throws JspException {
		String returnStr="";

		try {
			if (key != null || !key.equals(""))
			{
				returnStr =  I18nUtil.getValueByKey(key);
			}			
			pageContext.getOut().print(returnStr);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return EVAL_PAGE;
	}
	


	public String getKey() {
		return key;
	}


	public void setKey(String key) {
		this.key = key;
	}

}
	